import EventRoute from "./EventRoute"
import SystemMemberService from "../service/SystemMemberService";

const routes = new Array();
const systemMemberService = new SystemMemberService();
/**
 * 会员分页
 */
routes.push(
    new EventRoute('app-member-page', 'event', async (api, data = {}) => {
        systemMemberService.page(data.data)
    })
)

routes.push(
    new EventRoute('app-member-lookup', 'event', async (api, data = {}) => {
        systemMemberService.lookup(data.data)
    })
)

/**
 * 会员添加
 */
routes.push(
    new EventRoute('app-member-add', 'event', async (api, data = {}) => {
        systemMemberService.save(data.data)
    })
)

/**
 * 会员修改
 */
routes.push(
    new EventRoute('app-member-update', 'event', async (api, data = {}) => {
        systemMemberService.updateById(data.data)
    })
)

/**
 * 会员删除
 */
routes.push(
    new EventRoute('app-member-delete', 'event', async (api, data = {}) => {
        systemMemberService.deleteById(data.data)
    })
)

routes.push(
    new EventRoute('app-member-view', 'event', async (api, data = {}) => {
        systemMemberService.detail(data.data)
    })
)

export default routes;
